import request from '@/utils/request'

const BASE_URL = '/admin/system/sysMenu';

export default{

    getMenuList() {
        return request({
          url: `${BASE_URL}/findMenuTree`,
          method: 'get',
          
        })
      },


      addMenu(sysMenu){
        return request({
          url: `${BASE_URL}/addMenu`,
          method: 'post',
          data:sysMenu
        })
      },

      updateMenu(sysMenu){
        return request({
          url: `${BASE_URL}/updateMenu`,
          method: 'post',
          data:sysMenu
        })
      },

      removeById(id){
        return request({
          url: `${BASE_URL}/removeById/${id}`,
          method: 'delete',
          
        })
      },

      toAssign(role_id){
        return request({
          url: `${BASE_URL}/toAssign/${role_id}`,
          method: 'get',
          
        })
      },

      doAssign(assignMenuVo){
        return request({
          url: `${BASE_URL}/doAssign`,
          method: 'post',
          data:assignMenuVo
        })
      }


    

} 
